import request from "@/api/request";
import { type AxiosRequestConfig } from "axios";
import { type DeepRequired } from "../../interface";

/**
 * /project/upload/online
 */
export function postProjectUploadOnline(params: PostProjectUploadOnlineParams, input?: PostProjectUploadOnlineInput, config?: AxiosRequestConfig) {
    const paramsInput = {
        id: params.id,
        onlineTime: params.onlineTime,
    };
    return request.post<DeepRequired<any>>(`/project/upload/online`, input, {
        params: paramsInput,
        ...config,
    });
}

export interface PostProjectUploadOnlineParams {
    id: number;
    onlineTime?: string;
}

export interface PostProjectUploadOnlineInput {
    file?: File;
}
